<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<title>首页</title>

		<link href="AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
		<link href="AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css" />

		<link href="basic/css/demo.css" rel="stylesheet" type="text/css" />

		<link href="css/hmstyle.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="js/vue2.5.js" ></script>
		<script type="text/javascript" src="js/axios.min.js" ></script>
		<script type="text/javascript" src="js/jquery-1.11.2.min.js" ></script>
		<script type="text/javascript" src="js/global.js" ></script>
		<script type="text/javascript" src="js/bootstrap/js/bootstrap.js" ></script>
		<script type="text/javascript" src="js/layer/layer.js" ></script>
		<script src="js/param.js"></script>
		
		<script src="AmazeUI-2.4.2/assets/js/amazeui.min.js"></script>
		
		<style>
			.am-slides #banner1{
				background: #F4D1AB;
			}
			.am-slides #banner2{
				background: #ECEDF1;
			}
			.am-slides #banner3{
				background: #DFFFD0;
			}
			.am-slides #banner4{
				background: #FFD21D;
			}
		</style>
	</head>

	<body>
		<div class="hmtop container" style="top: -125px; position: relative;">
			<!--顶部导航条 -->
			<div class="am-container header " style="height: 125px;">
				<div class="clear"></div>
			</div>

			<div class="banner">
				<!--轮播 -->
				<div class="am-slider am-slider-default scoll" data-am-flexslider id="demo-slider-0">
					<ul class="am-slides">
						<li class="banner1" id="banner1">
							<a href="home/introduction.html"><img src="images/banner/banner1.jpg" width="1010px" height="455px"/></a>
						</li>
						<li class="banner2" id="banner2">
							<a><img src="images/banner/banner2.jpg" width="1010px" height="455px"/></a>
						</li>
						<li class="banner3"id="banner3">
							<a><img src="images/banner/banner3.jpg" width="1010px" height="455px"/></a>
						</li>
						<li class="banner4"id="banner4">
							<a><img src="images/banner/banner4.png" width="1010px" height="455px"/></a>
						</li>

					</ul>
				</div>
				<div class="clear"></div>
			</div>

			<div class="shopNav">
				<div class="slideall">

					<div class="long-title"><span class="all-goods">全部分类</span></div>
					<div class="nav-cont">
						<ul>
							<li class="index"><a href="index.html">首页</a></li>
							<li class="qc"><a href="person/text.html">推荐</a></li>
							<li class="qc"><a href="home/search.html">搜索</a></li>
							<li class="qc"><a href="#">团购</a></li>
							<li class="qc last"><a href="person/about.html">我们</a></li>
						</ul>

					</div>

					
				</div>
				
          <div class="f1 ">
			<!--水果-->
			<div class="am-container " >
				<div class="shopTitle ">
					<h4 class="floor-title ">水果</h4>
					<div class="floor-subtitle "><em class="am-icon-caret-left "></em><h3>每一个水果都保证新鲜</h3></div>
					<div class="today-brands " style="right:0px ;top:13px; ">
						<a href="# " @click="query(pager.pageNum+1)">更多</a>|
					</div>

				</div>
			</div>
			
			<div class="am-g am-g-fixed floodSix ">				
				<li v-for="(goods ,index) in goodsData">
					<div class="am-u-md-2 am-u-lg-2 text-three">
						<div class="boxLi "></div>
						<div class="outer-con ">
							<div class="title ">
								{{goods.gname}}
							</div>								
							<div class="sub-title ">
								¥{{goods.gprice}}
							</div>
							
						</div>
						<a :href="'home/introduction.jsp?gid='+goods.gid"><img :src="baseUrl+'/goods/getgoods?gid='+ goods.gid"  style="max-height:130px ;"/></a>
					</div>
				</li>
				
			</div>

			<div class="clear "></div>
		</div>
	</div>               
            
            
            
	<div class="footer " style="position: relative; bottom: -125px;">
		<div class="footer-hd ">
			<p>
					
				<b>|</b>
				<a href="# ">商城首页</a>
				<b>|</b>
				<a href="# ">支付宝</a>
				<b>|</b>
				<a href="# ">物流</a>
			</p>
		</div>
		<div class="footer-bd ">
			<p>
				
				<a href="# ">合作伙伴</a>
				<a href="# ">联系我们</a>
				<a href="# ">网站地图</a>
				<em>© XXXXXXXXXXX<a href="# " target="_blank " title="模板之家 "></a></em>
			</p>
		</div>
	</div>
</div>
	



		
			
		
	
		
		<script>
			var vue = new Vue({
				el:'.container',
				data:{
					user:{},
					baseUrl:baseUrl,
					goodsData:[],
					pager: {} //分页数据
				},
				methods:{
					get: function() {
						axios.get(baseUrl + '/user/get', {
	
								params: {
									LoginName:localStorage.getItem('LoginName')
								}
	
							}).then(function(response) {
								localStorage.setItem("id", response.data.id);
	
							}.bind(this))
							.catch(function(error) {
								
							});
					},
					//查询数据方法
					query: function(pageNum) {
						
						if(pageNum > this.pager.pageCount){
							layer.msg('没有更多了');
							return ;
						}
						
						axios.get(baseUrl + '/goods/query',{
							params:{
								pageNum:pageNum,
								pageSize:10
							}
						})
							.then(function(response) {
								
								this.pager = response.data.pager;
							
								response.data.list.forEach(function(item,index){
									this.goodsData.push(item);
								}.bind(this));
								
							}.bind(this))
							.catch(function(error) {
								layer.msg('获得图片列表失败');
							});

					}
					
				},mounted: function() {
					this.get();
					this.query(1);
				}
			});
		</script>
			<script>
			window.jQuery || document.write('<script src="basic/js/jquery.min.js "><\/script>');
		</script>
		<script type="text/javascript " src="basic/js/quick_links.js "></script>
		<!--轮播 -->
		<script type="text/javascript">
			(function() {
				$('.am-slider').flexslider();
			});
			$(document).ready(function() {
				$("li").hover(function() {
					$(".category-content .category-list li.first .menu-in").css("display", "none");
					$(".category-content .category-list li.first").removeClass("hover");
					$(this).addClass("hover");
					$(this).children("div.menu-in").css("display", "block")
				}, function() {
					$(this).removeClass("hover")
					$(this).children("div.menu-in").css("display", "none")
				});
			})
		</script>
		<script type="text/javascript">
			if ($(window).width() < 640) {
				function autoScroll(obj) {
					$(obj).find("ul").animate({
						marginTop: "-39px"
					}, 500, function() {
						$(this).css({
							marginTop: "0px"
						}).find("li:first").appendTo(this);
					})
				}
				$(function() {
					setInterval('autoScroll(".demo")', 3000);
				})
			}
		</script>
	</body>

</html>